<jsp:useBean id="register" class="dasregistry.registryBean" scope="session"/> 
<jsp:directive.page import="org.biojava.dasobert.dasregistry.DasCoordinateSystem"/>
<jsp:setProperty name="register" property="*"/>

<% String title="add test regions";
   String header=title;
%>


<%@ include file="sangerheader.jsp" %>

<div id="main">

<h2> Step 2/3 add test region</h2>
<%
String[] coords = register.getCSTypes();
if ( coords.length == 0 ) {
   %>You did not choose a coordinate system!<%
} else {
%>
For validation of the server a test region needs to be provided for
each coordinate system.

<form action="registerAction.jsp">

<%@ include file="sangertablestart.jsp" %>
<tr class="row0"><td colspan="2">test regions for DAS source <%=register.getNickname()%></td></tr>
<%
for (int i=0;i<coords.length;i++){
    String coord = coords[i];
    %><tr class="row1"><td>coordinate system:</td>
       <td><input type="hidden" name="CSTypes" value="<%=coord%>"/><%=coord%></td></tr>
       <tr class="row2"><td colspan="2"><input type="text" name="testCodes" size="60"/></td></tr>
       
    <%
}
%>
<%@ include file="sangertableend.jsp" %>
<input type="submit" value="register" >
<input type="hidden" name="nickname" value="<%=register.getNickname()%>"/>
<input type="hidden" name="dasurl" value="<%=register.getDasurl()%>"/>
<input type="hidden" name="adminemail" value="<%=register.getAdminemail()%>"/>
<input type="hidden" name="description" value="<%=register.getDescription()%>"/>
<input type="hidden" name="spec" value="<%=register.getSpec() %>"/>
<% 
if (isAdmin)  {	
%>
<input type="hidden" name="ignoreValidation" value="<%=register.getIgnoreValidation()%>"/>
<%
}
String[] caps = register.getCapabilities();
for (int i=0;i<caps.length;i++) {
    String cap = caps[i];
    %><input type="hidden" name="capabilities" value="<%=cap%>"/>
<%
}
%>
<input type="hidden" name="helperurl" value="<%=register.getHelperurl()%>"/>
<%
String[] labels = register.getLabels();
for (int i=0; i< labels.length;i++){
    String label = labels[i];
    %><input type="hidden" name="labels" value="<%=label%>"/>
<%
}
%>
<input type="hidden" name="alertMe" value="<%= register.getAlertMe()%>"/>

</form>
<%}%>
</div>
<%@ include file="sangerfooter.jsp" %>

